package io;

import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStreamReader;
import java.nio.charset.StandardCharsets;

public class InputStreamReaderDemo01 {
    public static void main(String[] args) throws IOException {
        InputStreamReader isr =
                new InputStreamReader(
                        new FileInputStream("f2.txt"),
                        StandardCharsets.UTF_8
                );

        int data;
        while ((data=isr.read())!=-1){
            System.out.print((char) data);
        }

        isr.close();

    }
}
